home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / loadAnimPanelLibrary.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.4 KB  |  113 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  November 20, 1996
  22. //  Author:         mm
  23. //
  24. //  Description:
  25. //      This script contains common menu definition routines shared
  26. //    between the graph editor and the dope sheet.
  27. //
  28. //        A call to the proc 'loadAnimPanelLibrary' will make sure that
  29. //    all the other helper procs defined in here are loaded and available
  30. //
  31. //    Procs defined within this script:
  32. //
  33. //  Input Arguments:
  34. //      None.
  35. //
  36. //  Return Value:
  37. //      None.
  38. //
  39.  
  40. global proc string[]
  41. definePanelElements (string $panel)
  42. //
  43. //    Procedure Name:
  44. //        definePanelElements
  45. //
  46. //    Description:
  47. //        This creates the common widgets for animation panels
  48. //
  49. //    Example:
  50. //        Create a menu that this submenu is to be attached to
  51. //    (make sure that the menu is defined to allow option boxes)
  52. //
  53. //        menuItem -label "Edit"
  54. //            -allowOptionBoxes true
  55. //            -subMenu true
  56. //            editHierItem;
  57. //            defineEditMenu $editor "editHierItem"; 
  58. //        setParent -m ..;
  59. //
  60. //  Input Arguments:
  61. //        string $panel            The name of the panel being created
  62. //        string $parentMenu        The name of the parent menu that this
  63. //                                submenu is being attached to
  64. //
  65. //  Return Value:
  66. //      string[] where:
  67. //            [0]        Name of the container layout
  68. //            [1]        Name of the menu frame
  69. //            [2]        Name of the menu form
  70. //            [3]        Name of the toolbar frame
  71. //            [4]        Name of the toolbar form
  72. //            [5]        Name of the editor layout
  73. //        Note: add new return names below here
  74. //
  75. {
  76.     string $widgetList[];
  77.  
  78.     $widgetList[2] = `scriptedPanel -query -control $panel`;
  79.     $widgetList[0] = `formLayout`;
  80.     $widgetList[3] = `frameLayout -visible true -borderVisible false
  81.             -labelVisible false -collapsable false -collapse true
  82.             -borderStyle "in"`;
  83.     $widgetList[4] = `formLayout -visible true`;
  84.     setParent $widgetList[0];
  85.     $widgetList[5] = `rowLayout -numberOfColumns 2
  86.             -adjustableColumn 2 -columnWidth 1 190
  87.             -rowAttach 1 "both" 0 -columnAttach 1 "both" 0
  88.             -rowAttach 2 "both" 0 -columnAttach 2 "both" 0`;
  89. //    $widgetList[5] = `formLayout -visible true`;
  90.  
  91.     formLayout -edit
  92.         -attachForm $widgetList[3] top 0 
  93.         -attachForm $widgetList[3] right 0
  94.         -attachForm $widgetList[3] left 0
  95.  
  96.         -attachControl $widgetList[5] top 0 $widgetList[3]
  97.         -attachForm $widgetList[5] bottom 0
  98.         -attachForm $widgetList[5] right 0
  99.         -attachForm $widgetList[5] left 0
  100.         $widgetList[0];
  101.  
  102.     setParent $widgetList[0];
  103.     return ($widgetList);
  104. }
  105.  
  106. global proc
  107. loadAnimPanelLibrary ()
  108. {
  109.     // Load in the common menu elements library
  110.     //
  111.     loadAnimMenuLibrary;
  112. }
  113.